(0) Obligation:
The Runtime Complexity (innermost) of the given
CpxTRS could be proven to be
BOUNDS(1, n^2).
The TRS R consists of the following rules:
U11(tt, M, N) → U12(tt, activate(M), activate(N))
U12(tt, M, N) → s(plus(activate(N), activate(M)))
U21(tt, M, N) → U22(tt, activate(M), activate(N))
U22(tt, M, N) → plus(x(activate(N), activate(M)), activate(N))
plus(N, 0) → N
plus(N, s(M)) → U11(tt, M, N)
x(N, 0) → 0
x(N, s(M)) → U21(tt, M, N)
activate(X) → X
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted Cpx (relative) TRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
U11(tt, z0, z1) → U12(tt, activate(z0), activate(z1))
U12(tt, z0, z1) → s(plus(activate(z1), activate(z0)))
U21(tt, z0, z1) → U22(tt, activate(z0), activate(z1))
U22(tt, z0, z1) → plus(x(activate(z1), activate(z0)), activate(z1))
plus(z0, 0) → z0
plus(z0, s(z1)) → U11(tt, z1, z0)
x(z0, 0) → 0
x(z0, s(z1)) → U21(tt, z1, z0)
activate(z0) → z0
Tuples:
U11'(tt, z0, z1) → c(U12'(tt, activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
U12'(tt, z0, z1) → c1(PLUS(activate(z1), activate(z0)), ACTIVATE(z1), ACTIVATE(z0))
U21'(tt, z0, z1) → c2(U22'(tt, activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
U22'(tt, z0, z1) → c3(PLUS(x(activate(z1), activate(z0)), activate(z1)), X(activate(z1), activate(z0)), ACTIVATE(z1), ACTIVATE(z0), ACTIVATE(z1))
PLUS(z0, 0) → c4
PLUS(z0, s(z1)) → c5(U11'(tt, z1, z0))
X(z0, 0) → c6
X(z0, s(z1)) → c7(U21'(tt, z1, z0))
ACTIVATE(z0) → c8
S tuples:
U11'(tt, z0, z1) → c(U12'(tt, activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
U12'(tt, z0, z1) → c1(PLUS(activate(z1), activate(z0)), ACTIVATE(z1), ACTIVATE(z0))
U21'(tt, z0, z1) → c2(U22'(tt, activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
U22'(tt, z0, z1) → c3(PLUS(x(activate(z1), activate(z0)), activate(z1)), X(activate(z1), activate(z0)), ACTIVATE(z1), ACTIVATE(z0), ACTIVATE(z1))
PLUS(z0, 0) → c4
PLUS(z0, s(z1)) → c5(U11'(tt, z1, z0))
X(z0, 0) → c6
X(z0, s(z1)) → c7(U21'(tt, z1, z0))
ACTIVATE(z0) → c8
K tuples:none
Defined Rule Symbols:
U11, U12, U21, U22, plus, x, activate
Defined Pair Symbols:
U11', U12', U21', U22', PLUS, X, ACTIVATE
Compound Symbols:
c, c1, c2, c3, c4, c5, c6, c7, c8
(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 3 trailing nodes:
X(z0, 0) → c6
ACTIVATE(z0) → c8
PLUS(z0, 0) → c4
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
U11(tt, z0, z1) → U12(tt, activate(z0), activate(z1))
U12(tt, z0, z1) → s(plus(activate(z1), activate(z0)))
U21(tt, z0, z1) → U22(tt, activate(z0), activate(z1))
U22(tt, z0, z1) → plus(x(activate(z1), activate(z0)), activate(z1))
plus(z0, 0) → z0
plus(z0, s(z1)) → U11(tt, z1, z0)
x(z0, 0) → 0
x(z0, s(z1)) → U21(tt, z1, z0)
activate(z0) → z0
Tuples:
U11'(tt, z0, z1) → c(U12'(tt, activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
U12'(tt, z0, z1) → c1(PLUS(activate(z1), activate(z0)), ACTIVATE(z1), ACTIVATE(z0))
U21'(tt, z0, z1) → c2(U22'(tt, activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
U22'(tt, z0, z1) → c3(PLUS(x(activate(z1), activate(z0)), activate(z1)), X(activate(z1), activate(z0)), ACTIVATE(z1), ACTIVATE(z0), ACTIVATE(z1))
PLUS(z0, s(z1)) → c5(U11'(tt, z1, z0))
X(z0, s(z1)) → c7(U21'(tt, z1, z0))
S tuples:
U11'(tt, z0, z1) → c(U12'(tt, activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
U12'(tt, z0, z1) → c1(PLUS(activate(z1), activate(z0)), ACTIVATE(z1), ACTIVATE(z0))
U21'(tt, z0, z1) → c2(U22'(tt, activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
U22'(tt, z0, z1) → c3(PLUS(x(activate(z1), activate(z0)), activate(z1)), X(activate(z1), activate(z0)), ACTIVATE(z1), ACTIVATE(z0), ACTIVATE(z1))
PLUS(z0, s(z1)) → c5(U11'(tt, z1, z0))
X(z0, s(z1)) → c7(U21'(tt, z1, z0))
K tuples:none
Defined Rule Symbols:
U11, U12, U21, U22, plus, x, activate
Defined Pair Symbols:
U11', U12', U21', U22', PLUS, X
Compound Symbols:
c, c1, c2, c3, c5, c7
(5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 9 trailing tuple parts
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
U11(tt, z0, z1) → U12(tt, activate(z0), activate(z1))
U12(tt, z0, z1) → s(plus(activate(z1), activate(z0)))
U21(tt, z0, z1) → U22(tt, activate(z0), activate(z1))
U22(tt, z0, z1) → plus(x(activate(z1), activate(z0)), activate(z1))
plus(z0, 0) → z0
plus(z0, s(z1)) → U11(tt, z1, z0)
x(z0, 0) → 0
x(z0, s(z1)) → U21(tt, z1, z0)
activate(z0) → z0
Tuples:
PLUS(z0, s(z1)) → c5(U11'(tt, z1, z0))
X(z0, s(z1)) → c7(U21'(tt, z1, z0))
U11'(tt, z0, z1) → c(U12'(tt, activate(z0), activate(z1)))
U12'(tt, z0, z1) → c1(PLUS(activate(z1), activate(z0)))
U21'(tt, z0, z1) → c2(U22'(tt, activate(z0), activate(z1)))
U22'(tt, z0, z1) → c3(PLUS(x(activate(z1), activate(z0)), activate(z1)), X(activate(z1), activate(z0)))
S tuples:
PLUS(z0, s(z1)) → c5(U11'(tt, z1, z0))
X(z0, s(z1)) → c7(U21'(tt, z1, z0))
U11'(tt, z0, z1) → c(U12'(tt, activate(z0), activate(z1)))
U12'(tt, z0, z1) → c1(PLUS(activate(z1), activate(z0)))
U21'(tt, z0, z1) → c2(U22'(tt, activate(z0), activate(z1)))
U22'(tt, z0, z1) → c3(PLUS(x(activate(z1), activate(z0)), activate(z1)), X(activate(z1), activate(z0)))
K tuples:none
Defined Rule Symbols:
U11, U12, U21, U22, plus, x, activate
Defined Pair Symbols:
PLUS, X, U11', U12', U21', U22'
Compound Symbols:
c5, c7, c, c1, c2, c3
(7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
X(z0, s(z1)) → c7(U21'(tt, z1, z0))
We considered the (Usable) Rules:
activate(z0) → z0
And the Tuples:
PLUS(z0, s(z1)) → c5(U11'(tt, z1, z0))
X(z0, s(z1)) → c7(U21'(tt, z1, z0))
U11'(tt, z0, z1) → c(U12'(tt, activate(z0), activate(z1)))
U12'(tt, z0, z1) → c1(PLUS(activate(z1), activate(z0)))
U21'(tt, z0, z1) → c2(U22'(tt, activate(z0), activate(z1)))
U22'(tt, z0, z1) → c3(PLUS(x(activate(z1), activate(z0)), activate(z1)), X(activate(z1), activate(z0)))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(PLUS(x1, x2)) = 0
POL(U11(x1, x2, x3)) = 0
POL(U11'(x1, x2, x3)) = 0
POL(U12(x1, x2, x3)) = 0
POL(U12'(x1, x2, x3)) = 0
POL(U21(x1, x2, x3)) = 0
POL(U21'(x1, x2, x3)) = x2
POL(U22(x1, x2, x3)) = 0
POL(U22'(x1, x2, x3)) = x2
POL(X(x1, x2)) = x2
POL(activate(x1)) = x1
POL(c(x1)) = x1
POL(c1(x1)) = x1
POL(c2(x1)) = x1
POL(c3(x1, x2)) = x1 + x2
POL(c5(x1)) = x1
POL(c7(x1)) = x1
POL(plus(x1, x2)) = 0
POL(s(x1)) = [1] + x1
POL(tt) = 0
POL(x(x1, x2)) = 0
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:
U11(tt, z0, z1) → U12(tt, activate(z0), activate(z1))
U12(tt, z0, z1) → s(plus(activate(z1), activate(z0)))
U21(tt, z0, z1) → U22(tt, activate(z0), activate(z1))
U22(tt, z0, z1) → plus(x(activate(z1), activate(z0)), activate(z1))
plus(z0, 0) → z0
plus(z0, s(z1)) → U11(tt, z1, z0)
x(z0, 0) → 0
x(z0, s(z1)) → U21(tt, z1, z0)
activate(z0) → z0
Tuples:
PLUS(z0, s(z1)) → c5(U11'(tt, z1, z0))
X(z0, s(z1)) → c7(U21'(tt, z1, z0))
U11'(tt, z0, z1) → c(U12'(tt, activate(z0), activate(z1)))
U12'(tt, z0, z1) → c1(PLUS(activate(z1), activate(z0)))
U21'(tt, z0, z1) → c2(U22'(tt, activate(z0), activate(z1)))
U22'(tt, z0, z1) → c3(PLUS(x(activate(z1), activate(z0)), activate(z1)), X(activate(z1), activate(z0)))
S tuples:
PLUS(z0, s(z1)) → c5(U11'(tt, z1, z0))
U11'(tt, z0, z1) → c(U12'(tt, activate(z0), activate(z1)))
U12'(tt, z0, z1) → c1(PLUS(activate(z1), activate(z0)))
U21'(tt, z0, z1) → c2(U22'(tt, activate(z0), activate(z1)))
U22'(tt, z0, z1) → c3(PLUS(x(activate(z1), activate(z0)), activate(z1)), X(activate(z1), activate(z0)))
K tuples:
X(z0, s(z1)) → c7(U21'(tt, z1, z0))
Defined Rule Symbols:
U11, U12, U21, U22, plus, x, activate
Defined Pair Symbols:
PLUS, X, U11', U12', U21', U22'
Compound Symbols:
c5, c7, c, c1, c2, c3
(9) CdtKnowledgeProof (BOTH BOUNDS(ID, ID) transformation)
The following tuples could be moved from S to K by knowledge propagation:
U21'(tt, z0, z1) → c2(U22'(tt, activate(z0), activate(z1)))
U22'(tt, z0, z1) → c3(PLUS(x(activate(z1), activate(z0)), activate(z1)), X(activate(z1), activate(z0)))
U22'(tt, z0, z1) → c3(PLUS(x(activate(z1), activate(z0)), activate(z1)), X(activate(z1), activate(z0)))
X(z0, s(z1)) → c7(U21'(tt, z1, z0))
(10) Obligation:
Complexity Dependency Tuples Problem
Rules:
U11(tt, z0, z1) → U12(tt, activate(z0), activate(z1))
U12(tt, z0, z1) → s(plus(activate(z1), activate(z0)))
U21(tt, z0, z1) → U22(tt, activate(z0), activate(z1))
U22(tt, z0, z1) → plus(x(activate(z1), activate(z0)), activate(z1))
plus(z0, 0) → z0
plus(z0, s(z1)) → U11(tt, z1, z0)
x(z0, 0) → 0
x(z0, s(z1)) → U21(tt, z1, z0)
activate(z0) → z0
Tuples:
PLUS(z0, s(z1)) → c5(U11'(tt, z1, z0))
X(z0, s(z1)) → c7(U21'(tt, z1, z0))
U11'(tt, z0, z1) → c(U12'(tt, activate(z0), activate(z1)))
U12'(tt, z0, z1) → c1(PLUS(activate(z1), activate(z0)))
U21'(tt, z0, z1) → c2(U22'(tt, activate(z0), activate(z1)))
U22'(tt, z0, z1) → c3(PLUS(x(activate(z1), activate(z0)), activate(z1)), X(activate(z1), activate(z0)))
S tuples:
PLUS(z0, s(z1)) → c5(U11'(tt, z1, z0))
U11'(tt, z0, z1) → c(U12'(tt, activate(z0), activate(z1)))
U12'(tt, z0, z1) → c1(PLUS(activate(z1), activate(z0)))
K tuples:
X(z0, s(z1)) → c7(U21'(tt, z1, z0))
U21'(tt, z0, z1) → c2(U22'(tt, activate(z0), activate(z1)))
U22'(tt, z0, z1) → c3(PLUS(x(activate(z1), activate(z0)), activate(z1)), X(activate(z1), activate(z0)))
Defined Rule Symbols:
U11, U12, U21, U22, plus, x, activate
Defined Pair Symbols:
PLUS, X, U11', U12', U21', U22'
Compound Symbols:
c5, c7, c, c1, c2, c3
(11) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
PLUS(z0, s(z1)) → c5(U11'(tt, z1, z0))
We considered the (Usable) Rules:
activate(z0) → z0
And the Tuples:
PLUS(z0, s(z1)) → c5(U11'(tt, z1, z0))
X(z0, s(z1)) → c7(U21'(tt, z1, z0))
U11'(tt, z0, z1) → c(U12'(tt, activate(z0), activate(z1)))
U12'(tt, z0, z1) → c1(PLUS(activate(z1), activate(z0)))
U21'(tt, z0, z1) → c2(U22'(tt, activate(z0), activate(z1)))
U22'(tt, z0, z1) → c3(PLUS(x(activate(z1), activate(z0)), activate(z1)), X(activate(z1), activate(z0)))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = [1]
POL(PLUS(x1, x2)) = x2
POL(U11(x1, x2, x3)) = [2]x1 + [2]x2 + x3 + [2]x32 + [2]x1·x2 + [2]x22
POL(U11'(x1, x2, x3)) = [2]x1 + x2 + x1·x3 + [2]x1·x2
POL(U12(x1, x2, x3)) = [2] + [2]x1 + x3 + x2·x3 + x1·x3 + [2]x12 + [2]x1·x2 + [2]x22
POL(U12'(x1, x2, x3)) = [2]x1 + x2
POL(U21(x1, x2, x3)) = [1] + [2]x2 + x3 + [2]x32 + x2·x3 + [2]x1·x3 + x12 + [2]x1·x2 + [2]x22
POL(U21'(x1, x2, x3)) = [2]x1 + [2]x3 + x2·x3 + [2]x1·x3 + x12 + x1·x2
POL(U22(x1, x2, x3)) = [1] + x1 + x3 + x32 + [2]x1·x3 + [2]x12 + [2]x22
POL(U22'(x1, x2, x3)) = [2]x1 + x3 + x2·x3
POL(X(x1, x2)) = x1·x2
POL(activate(x1)) = x1
POL(c(x1)) = x1
POL(c1(x1)) = x1
POL(c2(x1)) = x1
POL(c3(x1, x2)) = x1 + x2
POL(c5(x1)) = x1
POL(c7(x1)) = x1
POL(plus(x1, x2)) = [2] + x12
POL(s(x1)) = [2] + x1
POL(tt) = 0
POL(x(x1, x2)) = 0
(12) Obligation:
Complexity Dependency Tuples Problem
Rules:
U11(tt, z0, z1) → U12(tt, activate(z0), activate(z1))
U12(tt, z0, z1) → s(plus(activate(z1), activate(z0)))
U21(tt, z0, z1) → U22(tt, activate(z0), activate(z1))
U22(tt, z0, z1) → plus(x(activate(z1), activate(z0)), activate(z1))
plus(z0, 0) → z0
plus(z0, s(z1)) → U11(tt, z1, z0)
x(z0, 0) → 0
x(z0, s(z1)) → U21(tt, z1, z0)
activate(z0) → z0
Tuples:
PLUS(z0, s(z1)) → c5(U11'(tt, z1, z0))
X(z0, s(z1)) → c7(U21'(tt, z1, z0))
U11'(tt, z0, z1) → c(U12'(tt, activate(z0), activate(z1)))
U12'(tt, z0, z1) → c1(PLUS(activate(z1), activate(z0)))
U21'(tt, z0, z1) → c2(U22'(tt, activate(z0), activate(z1)))
U22'(tt, z0, z1) → c3(PLUS(x(activate(z1), activate(z0)), activate(z1)), X(activate(z1), activate(z0)))
S tuples:
U11'(tt, z0, z1) → c(U12'(tt, activate(z0), activate(z1)))
U12'(tt, z0, z1) → c1(PLUS(activate(z1), activate(z0)))
K tuples:
X(z0, s(z1)) → c7(U21'(tt, z1, z0))
U21'(tt, z0, z1) → c2(U22'(tt, activate(z0), activate(z1)))
U22'(tt, z0, z1) → c3(PLUS(x(activate(z1), activate(z0)), activate(z1)), X(activate(z1), activate(z0)))
PLUS(z0, s(z1)) → c5(U11'(tt, z1, z0))
Defined Rule Symbols:
U11, U12, U21, U22, plus, x, activate
Defined Pair Symbols:
PLUS, X, U11', U12', U21', U22'
Compound Symbols:
c5, c7, c, c1, c2, c3
(13) CdtKnowledgeProof (EQUIVALENT transformation)
The following tuples could be moved from S to K by knowledge propagation:
U11'(tt, z0, z1) → c(U12'(tt, activate(z0), activate(z1)))
U12'(tt, z0, z1) → c1(PLUS(activate(z1), activate(z0)))
U12'(tt, z0, z1) → c1(PLUS(activate(z1), activate(z0)))
PLUS(z0, s(z1)) → c5(U11'(tt, z1, z0))
Now S is empty
(14) BOUNDS(1, 1)